
// 注意：这是一个vuex@3 的 module 对象，只能应用在Vue2项目中
import { getTrademarkList } from "@/api/product"

const state = {
  trademarkList:[],
  total:0
}
const mutations = {
  UPDATE_TRADEMARKABOUT(state,trademarkAbout){
    state.trademarkList = trademarkAbout.records
    state.total = trademarkAbout.total
  }
}
const actions = {
  async getTrademarkList({commit},{page,pageSize}){
    const res = await getTrademarkList(page,pageSize)
    commit('UPDATE_TRADEMARKABOUT',res.data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
}
